#ifndef _CI_H_
#define _CI_H_

#include "mmi.h"
#include"sas.h"
#include"dvb.h"

typedef enum
{
	SMART_CARD_UNINSTALLED=0,
	SMART_CARD_INSTALLED_OK=1,
	SMART_CARD_INSTALLED_WRONG = 2,
	SMART_CARD_INVALID = 3,
}SmartCardInstallInfo;

typedef enum
{
	TUNER_TYPE_DTMB = 1,
	TUNER_TYPE_DVBC = 2,
	TUNER_TYPE_DVBT = 4,
	TUNER_TYPE_DVBT2 = 8,
	TUNER_TYPE_DVBS = 16,
	TUNER_TYPE_DVBS2 = 32,
}DvbTunerInfo;

typedef struct
{
	char deviceType[100];
	char deviceId[100];
	char firmwareVersion[100];
	char Info[100];
	char deviceModel[50];
	char tunerType[50];
	char isDTCheck[50];
}CIData;

void 	EnterMenu();

void 	ShutDownSession();

int    	getDeviceId(char *buffer);

int    	getDeviceType(char *buffer);

int 		getCardInfo(CIData* buffer);

int		getDongleHw(CIData* dongle_hw_str, unsigned short *data_len);

int 		MmiConvertString(char *pString, int len);

int 		DVBMmiCloseDisplay(int isFlush);

unsigned char DVBMmiEnqDisplay(mmiEnq_t *pEng,char *answ);

mmiEnq_t *GetPEnq();

void        GetPin(char* pch);

int		DVBMmiMenuDisplay(menu_t *pMenu);

menu_t* GetPMenu();

void		GetIndex(int index);

unsigned int 	DVBUpDataCIData();


extern int cisas_get_dongle_hw(char* dongle_hw_str, unsigned short *data_len);

#endif
